<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>跳转界面</title>

</head>
<body>

<h3>未登录或登录已失效，<span id="num">3</span>秒后跳转至登录界面...<a href="/login">立即跳转</a></h3>
<script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script type="text/javascript">
    $(function () {
        let num = 2;
        setInterval(function () {
            if (num > 0) {
                $('#num').html(num);
                num--;
            } else {
                location = '/login';
            }
        }, 1000)
    })
</script>
</body>
</html>
